#! /bin/bash

set -euo pipefail

echo "Removing AppImageLauncher as interpreter for AppImages"
(set -x; systemctl restart systemd-binfmt)

update_notifier="/usr/share/update-notifier/notify-reboot-required"
if [ -x "$update_notifier" ]; then
    "$update_notifier"
fi

cat <<EOF
#####################################################
#                                                   #
#  NOTE: you need to reboot your computer in order  #
#  to complete the uninstallation                   #
#                                                   #
#  (If you see this message during an upgrade:      #
#  don't worry, you do not have to take any         #
#  action, no reboot required!)                     #
#                                                   #
#####################################################
EOF
